<div class="al-modal-view">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" ng-click="cancel()">
      <span aria-hidden="true" class="glyphicon glyphicon-remove"></span>
      <span class="sr-only">Close</span>
    </button>
    <h4 class="modal-title ok-color">{{modalTitle}}</h4>
  </div>
  <div class="modal-body">
    <ng-form name="modalForm" class="form-horizontal form-validation" role="form">
      <div class="form-group">
        <label class="col-sm-2 col-sm-offset-1 control-label">消息类型</label>
        <div class="col-sm-9">
          <select ng-model="data.buzType" class="form-control"
                  ng-options="option.value as option.name for option in mnfBuzTypeListConsole"></select>
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 col-sm-offset-1 control-label">消息级别</label>
        <div class="col-sm-9">
          <!--1-全局，2-私信，3-门店-->
          <select ng-model="data.type" class="form-control" ng-change="pickType()"
                  ng-options="option.value as option.name for option in mnfTypeListConsole"></select>
        </div>
      </div>
      <div class="form-group" ng-if="data.type==3">
        <label class="col-sm-2 col-sm-offset-1 control-label">选择门店</label>
        <div class="col-sm-9">
          <select ng-model="data.receiverId" class="form-control"
                  ng-options="option.id as option.name for option in modalApartmentList"></select>
        </div>
      </div>
      <!--<div class="form-group" ng-if="data.type==2">-->
        <!--<label class="col-sm-2 col-sm-offset-1 control-label">用户手机</label>-->
        <!--<div class="col-sm-9">-->
          <!--<input type="text" class="form-control" placeholder="请填写用户手机"-->
                 <!--ng-change="fetchUser()" required-->
                 <!--ng-model="data.phone" ng-pattern="$root.phoneVd">-->
        <!--</div>-->
      <!--</div>-->
      <!--<div class="form-group" ng-if="data.type==2">-->
        <!--<label class="col-sm-2 col-sm-offset-1 control-label"></label>-->
        <!--<div class="col-sm-9">-->
          <!--<div class="form-control info-text">{{showUserInfo()}}</div>-->
        <!--</div>-->
      <!--</div>-->
      <div class="form-group">
        <label class="col-sm-2 col-sm-offset-1 control-label">标题<span class="attr-need">*</span></label>
        <div class="col-sm-9">
          <textarea class="form-control" cols="5" ng-model="data.subject" required></textarea>
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 col-sm-offset-1 control-label">内容</label>
        <div class="col-sm-9">
          <textarea class="form-control" cols="5" ng-model="data.content"></textarea>
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 col-sm-offset-1 control-label">消息链接</label>
        <div class="col-sm-9">
          <input type="text" class="form-control" placeholder="消息链接"
                 ng-model="data.buzLink">
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 col-sm-offset-1 control-label">到期时间</label>
        <div class="col-sm-9">
          <div class="input-group">
            <input class="form-control" type="text" uib-datepicker-popup="yyyy-MM-dd HH:mm"
                   ng-model="data.expiredTime" is-open="enterEnd" maxlength="16"
                   close-text="关闭" current-text="今天" clear-text="清空"
                   ng-readonly="type=='view'"
                   placeholder=""/>
            <span class="input-group-btn">
                <button type="button" class="btn btn-default" ng-disabled="type=='view'"
                        ng-click="enterEnd=true">
                  <i class="glyphicon glyphicon-calendar"></i>
                </button>
              </span>
          </div>
        </div>
      </div>

    </ng-form>
  </div>
  <div class="modal-footer">
    <button class="btn btn-warning no-border" type="button" ng-click="cancel()">取消</button>
    <button class="btn btn-primary no-border" type="button" ng-click="confirm()"
            ng-disabled="modalForm.$invalid && data.receiverId!=undefined">确认</button>
  </div>
</div>